/**
 * Created by XianTao on 2015/5/18
 * <p>
 * Copyright (c) 2015-2015
 * Apache License
 * Version 2.0, January 2004
 * http://www.apache.org/licenses/
 */
package com.taotao.chisha.entity;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.io.Serializable;

@DatabaseTable(tableName = "t_meal_log")
public class MealLog implements Serializable {
    public static final String CREATED_TIME_FIELD_NAME = "created_time";
    public static final String MEAL_NAME_FIELD_NAME = "meal_name";
    public static final String VENDOR_FIELD_NAME = "vendor";

    @DatabaseField(columnName = MealLog.CREATED_TIME_FIELD_NAME)
    public Long createdTime;
    @DatabaseField(canBeNull = false, foreign = true)
    public Meal meal;


    public MealLog() {
    }

    public MealLog(Meal meal) {
        this.meal = meal;
        this.createdTime = System.currentTimeMillis();
    }
}
